package cn.openea.perpartner.payment.web.points.mapper;

import cn.openea.perpartner.payment.web.points.entity.AddPoints;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author Weird077
 * @description TODO
 * @date 2022-10-27 14:30
 */
@Repository
public interface AddPointsMapper extends BaseMapper<AddPoints> {
    @Select("select ifnull(sum(points),0) as points  from payment_points_add_log where user_id =#{userId}")
    double getCumulativePoints(String userId);
}
